package com.njwb.consumer.remote.service;

import com.njwb.common.json.ResponseResult;
import com.njwb.consumer.remote.fallback.FeignRemoteUserServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Service
@FeignClient(value = "spring-cloud-nacos-provider",fallbackFactory = FeignRemoteUserServiceFallbackFactory.class)//服务提供者名称
public interface FeignRemoteUserService {
    @GetMapping("/user/{id}")
    public ResponseResult getById(@PathVariable("id") Integer id);
}
